package sender;

import java.io.IOException;
import java.io.ObjectOutputStream;
import java.net.Socket;
import java.net.UnknownHostException;

import job.Job;
import job.JobEnvelope;

public class JobSender {
	
	public static void main (String args[]) {
		try {		
//			Socket s = new Socket("134.117.30.211", 31337);
			Socket s = new Socket("localhost", 31337);
			ObjectOutputStream oos = new ObjectOutputStream( s.getOutputStream() );
			JobEnvelope je = new JobEnvelope();
			Job j = new Job();
			je.job = j;
			j.addClass(Main.class);
			j.addClass(Foo.class);
			j.addClass(No.class);
			oos.writeObject(je);
		} catch (UnknownHostException e) {
			e.printStackTrace();
			System.exit(-1);
		} catch (IOException e) {
			e.printStackTrace();
			System.exit(-1);
		}
	}
}
